
CPP = g++
CPPFLAGS = -Wall -g
COMMON_OBJS = common.o utils.o commands.o serialization.o FileInfo.o ServerDatabase.o


all: cmclient cmserver


cmclient: cmclient.cpp  clientcommands.o $(COMMON_OBJS)
	$(CPP) $(CPPFLAGS) $^ -o cmclient

cmserver: cmserver.cpp $(COMMON_OBJS)
	$(CPP) $(CPPFLAGS) $^ -o cmserver


%.o: %.cpp %.h
	 $(CPP) -c $(CPPFLAGS) $< -o $@



format:
	astyle *.cpp *.h

clean:
	rm -f *.o cmserver cmclient
